#pragma once

#include <iostream>
#include <deque>
#include<list>
#include<vector>
namespace aoqiang
{
    template <class T, class Container = std::deque<T>>
    class queue
    {
    public:
        queue()
        {
        }
        ~queue()
        {
        }
        void push(const T &x)
        {
            con_.push_back(x);
        }
        void pop()
        {
            con_.pop_front();
        }

        T& front()
        {
            return con_.front();
        }
        T& back()
        {
            return con_.back();
        }
        size_t size()
        {
            return con_.size();
        }
        bool empty()
        {
            return con_.empty();
        }

    private:
        Container con_;
    };

    
	void test_queue()
	{
		 queue<int, std::list<int>> q;

		//queue<int, vector<int>> q;
		q.push(1);
		q.push(2);
		q.push(3);
		q.push(4);

		while (!q.empty())
		{
			std::cout << q.front() << " ";
			q.pop();
		}
		std::cout << std::endl;
	}

}